package com.prs.crm.service.stock;

import java.io.File;

import com.prs.crm.domain.stock.Product;
import com.prs.crm.domain.stock.Purchase;
import com.prs.crm.domain.stock.PurchaseDetail;
import com.prs.crm.service.FlowService;

public interface PurchaseService extends FlowService<Purchase> {
	/**
	 * 采购明细
	 * 
	 * @param detail
	 */
	public void save(Purchase purchase, Double[] prices, Integer[] stockNumes,
			Double[] discounts, Double[] total, Product[] products,
			String joiners, Integer[] storedNums);

	public void savePurchase(Purchase purchase, Product[] products,
			String joiners, Integer[] stockNumes,File file,String fileName);

	/**
	 * 保存采购明细
	 * 
	 * @param detail
	 */
	void saveDetail(PurchaseDetail detail);

	/**
	 * 获取采购明细
	 * 
	 * @param id
	 *            采购明细编号
	 * @return
	 */
	public PurchaseDetail getDetail(java.io.Serializable id);

	void saveOrUpdate(PurchaseDetail purchaseDetail);
	
	

	/**
	 * 状态
	 * @param id
	 * @return
	 */
	Purchase getPurchase(java.io.Serializable id);
	/**
	 * update
	 */
	void saveOrUpdate(Purchase purchase);

}
